import Slideshow from "@/components/client/index/SlideShow";
import ProdutList from "@/components/client/index/ProductList";
import getContact from "@/ssr/getContact";
import Index from '@/schema/index'
import About from '@/components/client/index/About'

export async function generateMetadata() {
  const contact = await getContact();
  return {
    title: `首页 | ${contact.meta_title || contact.name}`,
    description: `${contact.meta_description || contact.description}`,
  };
}

export default async function index() {
  const contact = await getContact();
  return (
    <>
      <Index info={contact} />
      <Slideshow />
      <About />
      <ProdutList />
    </>
  );
}
